package com.test.fileapplication.util;


import android.text.TextUtils;
import android.util.Log;

import java.util.ArrayList;
import java.util.List;

public class ResponseFileSearchBean {

    /**
     * totalcount : 6
     * data : [{"duration":"","fileName":"葫芦备份","thumbnail":"","fileSize":0,"updateTime":"1579036397000",
     * "location":"","ID":"1326077018374240","category":"2","parentId":"0","labels":"","residueTime":13},{"duration
     * ":"","fileName":"备份恢复","thumbnail":"","fileSize":0,"updateTime":"1579036397000","location":"",
     * "ID":"1326077018374272","category":"2","parentId":"0","labels":"","residueTime":13},{"duration":"",
     * "fileName":"收到文件","thumbnail":"","fileSize":0,"updateTime":"1579036397000","location":"",
     * "ID":"1326077018374304","category":"2","parentId":"0","labels":"","residueTime":13},{"duration":"",
     * "fileName":"回收站","thumbnail":"","fileSize":0,"updateTime":"1579036397000","location":"",
     * "ID":"1326077018374336","category":"2","parentId":"0","labels":"","residueTime":13},{"duration":"",
     * "fileName":"我的收藏","thumbnail":"","fileSize":0,"updateTime":"1579036397000","location":"",
     * "ID":"1326077018374368","category":"2","parentId":"0","labels":"","residueTime":13},{"duration":"",
     * "fileName":"我的相册","thumbnail":"","fileSize":0,"updateTime":"1579036397000","location":"",
     * "ID":"1326077018374400","category":"2","parentId":"0","labels":"","residueTime":13}]
     * success : true
     * message : 成功
     * status : 200
     */

    private int totalcount;
    private boolean success;
    private String message;
    private int status;
    private List<DataBean> data;

    public int getTotalcount() {
        return totalcount;
    }

    public void setTotalcount(int totalcount) {
        this.totalcount = totalcount;
    }

    public boolean isSuccess() {
        return success;
    }

    public void setSuccess(boolean success) {
        this.success = success;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public List<DataBean> getData() {
        return data;
    }

    public void setData(List<DataBean> data) {
        this.data = new ArrayList<>(data);
    }

    @Override
    public String toString() {
        return "ResponseFileSearchBean{" +
                "totalcount=" + totalcount +
                ", success=" + success +
                ", message='" + message + '\'' +
                ", status=" + status +
//                ", data=" + data +
                '}';
    }

    public static class DataBean {
        /**
         * duration :
         * fileName : 葫芦备份
         * thumbnail :
         * fileSize : 0
         * updateTime : 1579036397000
         * location :
         * ID : 1326077018374240
         * category : 2
         * parentId : 0
         * labels :
         * residueTime : 13
         */

        private String duration;
        private String fileName;
        private String thumbnail;
        private long fileSize;
        private long updateTime;
        private String location;
        private String ID;
        private String category;
        private String parentId;
        private String labels;
        private String residueTime;
        private String fileType;
        private int recoverStatus;
        private int backupStatus;
        private long deleteTime;

        public String getDuration() {
            return duration;
        }

        public void setDuration(String duration) {
            this.duration = duration;
        }

        public String getFileName() {
            return fileName;
        }

        public void setFileName(String fileName) {
            this.fileName = fileName;
        }

        public String getThumbnail() {
            return thumbnail;
        }

        public void setThumbnail(String thumbnail) {
            this.thumbnail = thumbnail;
        }

        public long getFileSize() {
            return fileSize;
        }

        public void setFileSize(int fileSize) {
            this.fileSize = fileSize;
        }

        public long getUpdateTime() {
            return updateTime;
        }

        public void setUpdateTime(long updateTime) {
            this.updateTime = updateTime;
        }

        public String getLocation() {
            return location;
        }

        public void setLocation(String location) {
            this.location = location;
        }

        public String getID() {
            return ID;
        }

        public void setID(String ID) {
            this.ID = ID;
        }

        public String getCategory() {
            return category;
        }

        public void setCategory(String category) {
            this.category = category;
        }

        public String getParentId() {
            return parentId;
        }

        public void setParentId(String parentId) {
            this.parentId = parentId;
        }

        public String getLabels() {
            return labels;
        }

        public void setLabels(String labels) {
            this.labels = labels;
        }

        public String getResidueTime() {
            return residueTime;
        }

        public void setResidueTime(String residueTime) {
            this.residueTime = residueTime;
        }

        public int getRecoverStatus() {
            return recoverStatus;
        }

        public void setRecoverStatus(int recoverStatus) {
            this.recoverStatus = recoverStatus;
        }

        public int getBackupStatus() {
            return backupStatus;
        }

        public void setBackupStatus(int backupStatus) {
            this.backupStatus = backupStatus;
        }

        public long getDeleteTime() {
            return deleteTime;
        }

        public void setDeleteTime(long deleteTime) {
            this.deleteTime = deleteTime;
        }

        @Override
        public String toString() {
            return "DataBean{" +
                    "duration='" + duration + '\'' +
                    ", fileName='" + fileName + '\'' +
                    ", thumbnail='" + thumbnail + '\'' +
                    ", fileSize=" + fileSize +
                    ", updateTime=" + updateTime +
                    ", location='" + location + '\'' +
                    ", ID='" + ID + '\'' +
                    ", category='" + category + '\'' +
                    ", parentId='" + parentId + '\'' +
                    ", labels='" + labels + '\'' +
                    ", residueTime=" + residueTime +
                    ", deleteTime=" + deleteTime +
                    ", fileType='" + fileType + '\'' +
                    ", recoverStatus='" + recoverStatus + '\'' +
                    ", backupStatus='" + backupStatus + '\'' +
                    '}';
        }

        public int getFileType() {
            if (TextUtils.isEmpty(fileType))
                return 0;
            int type = 0;
            try {
                type = Integer.parseInt(fileType);
            } catch (Exception e) {
                Log.e("强转异常", fileType + "---");
            }
            return type;
        }

        public void setFileType(String fileType) {
            this.fileType = fileType;
        }
    }
}
